package cn.com.infcn.monitor.task.impl;

import org.apache.mina.core.session.IoSession;

import cn.com.infcn.monitor.task.IoTask;

public abstract class BaseTask implements IoTask{
	
	protected IoSession session;
	protected Object message;
	
	public BaseTask(IoSession session, Object message) {
		super();
		this.session = session;
		this.message = message;
	}
	
	protected void sendResponse(Object response) {
    	if (session != null && response != null) {
    		session.write(response);
        }
    }

}
